home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / examples / scheme / string-port < prev    next >
Encoding:
Text File  |  1991-09-25  |  518 b   |  20 lines

  1. ;;; -*-Scheme-*-
  2. ;;;
  3. ;;; Test program for string ports
  4.  
  5. (let ((s1 (make-string 63 #\a))
  6.       (s2 (make-string 66 #\b))
  7.       (s3 (make-string 1500 #\c))
  8.       (f (open-output-string)))
  9.   (display s1 f)
  10.   (display s2 f)
  11.   (display s3 f)
  12.   (display (string-append (get-output-string f) ".") f)
  13.   (write (string-length (get-output-string f)))
  14.   (display " ")
  15.   (print (+ 1 63 66 1500))
  16.   (define f (open-input-string s2))
  17.   (write (string-length s2))
  18.   (display " ")
  19.   (print (string-length (symbol->string (read f)))))
  20.